/* 全局样式 */
:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #096dd9;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #f5222d;
    --bg-color: #f0f2f5;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #e8e8e8;
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

/* 顶部区域 */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 0 24px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-medium);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    transition: var(--transition-normal);
}

.header:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.logo {
    height: 40px;
    margin-right: 16px;
    transition: var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}

.system-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 左侧导航栏 */
.sidebar {
    background-color: white;
    width: 220px;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    padding: 24px 0;
    box-shadow: var(--shadow-small);
    overflow-y: auto;
    transition: var(--transition-normal);
    z-index: 900;
}

.sidebar:hover {
    box-shadow: var(--shadow-medium);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-normal);
    border-left: 3px solid transparent;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
    font-size: 16px;
    transition: var(--transition-normal);
}

.nav-item:hover {
    background-color: #e6f7ff;
    color: var(--primary-color);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background-color: #e6f7ff;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

/* 主内容区 */
.main-content {
    margin-left: 220px;
    margin-top: 64px;
    padding: 24px;
    flex: 1;
    max-width: 1600px;
    transition: var(--transition-normal);
}

/* 搜索框样式 */
.search-container {
    margin-bottom: 24px;
}

.search-form {
    display: flex;
    gap: 16px;
    max-width: 800px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.search-button {
    padding: 0 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-normal);
}

.search-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.search-button:active {
    background: var(--primary-active);
    transform: translateY(0);
}

/* 数据统计摘要 */
.data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-small);
    transition: var(--transition-normal);
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.summary-item i {
    font-size: 24px;
    color: var(--primary-color);
    background: #e6f7ff;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
}

.summary-content {
    flex: 1;
}

.summary-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 表格容器 */
.table-container {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

/* 表格样式 */
.book-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.book-table th,
.book-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.book-table th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.book-table th i {
    margin-right: 8px;
    color: var(--text-secondary);
}

.book-table tr {
    transition: var(--transition-normal);
}

.book-table tr:hover {
    background-color: #f5f5f5;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: var(--success-color);
}

.status-ongoing {
    background-color: #fff7e6;
    border: 1px solid #ffd591;
    color: var(--warning-color);
}

/* 分类标签 */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #f0f5ff;
    border: 1px solid #d6e4ff;
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
}

/* 最新章节 */
.latest-chapter {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px !important;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.empty-state-content i {
    font-size: 48px;
    color: #d9d9d9;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination-button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.pagination-button:hover:not([disabled]) {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small);
}

.pagination-button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    cursor: default;
}

.pagination-button[disabled] {
    background-color: #f5f5f5;
    border-color: var(--border-color);
    color: #d9d9d9;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-secondary);
    margin: 0 4px;
}

/* 图表容器样式 */
.chart-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-small);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.chart-container:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.chart {
    width: 100%;
    height: 500px;
    transition: var(--transition-normal);
}

/* 图表标题和操作区 */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title i {
    color: var(--primary-color);
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.action-button:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small);
}

.action-button:active {
    transform: translateY(0);
}

.action-button i {
    font-size: 14px;
}

/* 图表描述 */
.chart-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.chart-description i {
    color: var(--primary-color);
    margin-top: 3px;
}

.chart-description p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* 图表过滤器 */
.chart-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 百分比条 */
.percentage-bar {
    position: relative;
    height: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.percentage-fill {
    position: absolute;
}